package com.automation.ljf.exception;


import com.automation.ljf.exception.type.ExceptionEnums;

/**
 * 自定义异常
 *
 * @author lijiefeng
 * @since 2021/9/2
 */
public class BizException extends RuntimeException{

    private Integer code;


    public BizException(Integer code,String msg){
        super(msg);
        this.setCode(code);
    }

    public BizException(ExceptionEnums exceptionEnums){
        super(exceptionEnums.getMsg());
        this.setCode(exceptionEnums.getCode());
    }

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }

}
